import { WeaTools } from 'ecCom';

//得到接受人共享的数据
export const getSharePersonalList = (params = {planType: null, shareType: null}) => {
    return WeaTools.callApi('/api/workplan/share/getSharePersonalList', 'POST', params);
};

//得到接收人人共享中用于高级搜索的表单控件的数据
export const getSharePersonalCondition = (params = {}) => {
    return WeaTools.callApi('/api/workplan/share/getSharePersonalCondition', 'POST', params);
};


//得到创建人共享的数据
export const getShareCreatelList = (params = {planType: null, shareType: null, shareLevel: null}) => {
    return WeaTools.callApi('/api/workplan/share/getShareCreatelList', 'POST', params);
};


//得到创建人共享中用于高级搜索的表单控件的数据
export const getShareCreateCondition = (params = {}) => {
    return WeaTools.callApi('/api/workplan/share/getShareCreateCondition', 'POST', params);
};

//得到添加日程共享中的所有日程类型数据
export const getSelectType = (params = {showAll: 1}) => {
    return WeaTools.callApi('/api/workplan/type/getSelectType', 'POST', params);
};

//删除接收人共享
export const deleteDefaultShare = (params) => {
    return WeaTools.callApi('/api/workplan/share/deleteDefaultShare', 'POST', params);
};
// 删除创建人共享
export const deleteCreateDefaultShare = (params) => {
    return WeaTools.callApi('/api/workplan/share/deleteCreateDefaultShare', 'POST', params);
};

// 得到接收人共享的authfield
export const getPersonShareAuthField = (params) => {
    return WeaTools.callApi('/api/workplan/share/getPersonShareAuthField', 'POST', params);
};

// 得到创建人共享的authfield
export const getCreateShareAuthField = (params) => {
    return WeaTools.callApi('/api/workplan/share/getCreateShareAuthField', 'POST', params);
};

// 接收人共享的添加日程共享的保存接口
export const addPersonalDefaultShare = (params) => {
    return WeaTools.callApi('/api/workplan/share/addPersonalDefaultShare', 'POST', params);
};

// 创建人共享的添加日程共享的保存接口
export const addCreateDefaultShare = (params) => {
    return WeaTools.callApi('/api/workplan/share/addCreateDefaultShare', 'POST', params);
};


